package com.kxn.multi.module.api.controller;

import com.kxn.multi.module.service.service.CommonService;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@Api(tags = {"默认接口"})
@RestController
@RequestMapping("/api")
public class IndexController {

    @Resource
    CommonService commonService;

    @GetMapping("/test")
    public String test() {
        long ts = commonService.getTimestamp();
        return String.valueOf("api:" + ts);
    }

    @RequestMapping(method = RequestMethod.GET)
    @PostMapping("/test1")
    public String test1() {
        return "test";
    }
}
